<template>
  <div class="pufa_detail_page">
    <Menus />
    <div class="main">
      <div class="title">
        <span class="article_type">图说新闻</span>
        <h1>{{item.title}}</h1>
        <span class="time">发布时间：{{item.date}}</span>
      </div>
      <div class="main_text" v-html="item.detail">
      </div>
    </div>
  </div>
</template>
<script>
import Menus from '../components/Menu'
import api from '../datas/api'
export default {
  data() {
    return {
      item: ''
    }
  },
  async mounted() {
    const { id } = this.$route.params
    const { item } = await this.$get(api.pufa.post + id, this)
    this.item = item
  },
  components: {
    Menus
  }
}
</script>
<style lang="scss">
.pufa_detail_page {
  .main {
    padding-top: 160px;
    margin: 0 auto;
    background: #fff;
    .title {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: #eee;
      margin: 0 auto;
      padding: 50px 0;
      .article_type {
        display: block;
        font-size: 18px;
        color: #333;
        margin: 0 auto 35px;
        text-align: center;
      }
      h1 {
        width: 1050px;
        font-size: 36px;
        text-align: center;
        color: #333;
        font-weight: normal;
        margin: 0 0 20px;
      }
      .time {
        font-size: 14px;
        color: #aaa;
      }
    }
  }
  .main_text {
    padding: 50px 0 100px;
    width: 1000px;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.8;
    p {
      color: #7a7a7a;
      margin: 0 0 25px;
    }
    img {
      display: block;
      background: #ddd;
      margin: 0 auto 20px;
    }
  }
}
</style>
